Skip to main content

All Questions

Tagged with
2votes
2answers
135views

LinkedList Stack Implementation

I'm new to the programming and I want to ask a question about my linkedlist stack implementation if it's correct and if it meets the requirements of the linkedlist stack implementation. If there is ...
E.Etem's user avatar
0votes
2answers
71views

Another Stack implementation in Java

I'm trying to write my own stack implementation using LinkedList. It looks like it is doing what it should doing. But how does it look from a design perspective? ...
Paweł Jarosiewicz's user avatar
9votes
2answers
2kviews

A counterexample in balanced parentheses

In this program I had to analyse if the parenthesis given are well balanced. For instance, input (()) is correct and input ())(()...
I likeThatMeow's user avatar
1vote
1answer
627views

Analyzing an arithmetic expression using stacks

I'm looking for some constructive (harsh) criticism of a homework I've done (the code works fine). Also Is there a better/another way to solve the exercise? Exercise: Read an arithmetic expression ...
I likeThatMeow's user avatar
4votes
2answers
288views

My implementation of Stack and Queue with Array without help of library functions

I am new to Java and am trying to learn coding. Here is my implementation of a stack and a queue without the help of library functions. Please provide your suggestions on design, coding style and ...
SLR's user avatar
  • 139
0votes
1answer
571views

Sort a stack using Java

This is my attempted solution to cracking the coding interview exercise 3.5. Looking for any feedback on coding style or the algorithm anywhere I can improve really. The problem specification is as ...
Average's user avatar
2votes
2answers
75views

Program looks for correct balance of ( [ and { in expression

I'm still new to programming. (First exposure was school about a year ago), and for some reason this problem really gave me a lot of problems trying to solve it. Can you help me understand what I ...
P. Fernandez's user avatar
10votes
2answers
2kviews

Implementation of stack

Task: Create a class RPNStack which represents a stack of objects of type Node. Class RPNStack contains only one private field top of type Node. Objects of type Node represent data that are ...
Eugene Shymko's user avatar
5votes
2answers
3kviews

Simple FIFO and LIFO ferry simulator

I am trying to make a ferry simulator with one ferry that works like a stack and another like a queue. I have a working class for stacks and queues with pop/push; I am trying to figure out how to ...
Shema Martin's user avatar
6votes
1answer
8kviews

Palindrome using stack

I recently started learning Java, algorithms, and data structures. I am trying to check if a string is palindrome. I would like a review to see where and how I could improve. ...
wandermonk's user avatar
2votes
3answers
3kviews

Delimiter-matching using Stack in Java

Is this code okay? ...
Arun Prakash's user avatar
10votes
6answers
24kviews

Reversing a String using Stack

Is this code okay? ...
Arun Prakash's user avatar
7votes
4answers
65kviews

Array Implementation of Stack

I've implemented the basic logic of a stack data structure. How can I make this code more generic? Is there any better way to display the stack contents? StackMethods.java ...
Arun Prakash's user avatar
10votes
3answers
113kviews

Stack implementation using a linked list

To understand the concept, I implemented the stack operations using a linked list. Please review the code and tell me your suggestions. Node.java ...
Arun Prakash's user avatar

close